
function CCBClient( scriptName, taskKey, isIE11 ) {
    //super(scriptName, taskKey, isIE11);
}

function get_jump( url) {
    var map = new LinkedHashMap();
    map.put("method", "get_jump");
    map.put("url",url);
    return sendAndReceive(map);
}

/**
 * 获取借记卡所在Frame的URL
 *
 * @return
 */
function getSrcUrl2( spanIndex, values) {
    var map = new LinkedHashMap();
    map.put("method", "get_src_url2");
    map.put("values", values);
    map.put("spanIndex", spanIndex);
    return sendAndReceive(map);
}

/**
 * 显示窗口,一直获得焦点
 */
function showDif( index) {
    var map = new LinkedHashMap();
    map.put("method", "show_dif_ie");
    map.put("index", index);
    return sendAndReceive(map);
}

/**
 * 跳转到借记卡所在Frame的URL
 *
 * @return
 */
function goToSrcUrl( urlIndex) {
    var map = new LinkedHashMap();
    map.put("method", "goto_src_url");
    map.put("urlIndex", urlIndex);
    return sendAndReceive(map);
}

function checkInputValue(iframeId,id,value){
    var map = new LinkedHashMap();
    map.put("method", "checkInputValue");
    map.put("iframeId", iframeId);
    map.put("id", id);
    map.put("value", value);
    return Boolean.valueOf(sendAndReceive(map));
}

function click_login_button(iframeId,id) {
    var map = new LinkedHashMap();
    map.put("iframeId", iframeId);
    map.put("id", id);
    map.put("method", "click_login_button");
    return sendAndReceive(map);
}
/**
 * 获取借记卡所在Frame的URL
 *
 * @return
 */
/*function getSrcUrl2() {
    var map = new LinkedHashMap();
    map.put("method", "get_src2");
    return sendAndReceive(map);
}*/

/**
 * 跳转到借记卡所在Frame的URL
 *
 * @return
 */
function goToSrcUrl2() {
    var map = new LinkedHashMap();
    map.put("method", "goto_src_url2");
    return sendAndReceive(map);
}

/**
 * 下载部分
 * 设置借记卡下载的起止时间
 *
 * @return
 */
function setCCBQueryCondition( START_DATE, END_DATE, index) {
    var map = new LinkedHashMap();
    map.put("method", "set_CCB_query_condition");
    map.put("START_DATE", START_DATE);
    map.put("END_DATE", END_DATE);
    map.put("index", index);
    return sendAndReceive(map);
}

/**
 * 下载部分
 * 设置借记卡下载的起止时间
 *
 * @return
 */
function setCCBQueryCondition2( START_DATE, END_DATE) {
    var map = new LinkedHashMap();
    map.put("method", "set_CCB_query_condition2");
    map.put("START_DATE", START_DATE);
    map.put("END_DATE", END_DATE);
    return sendAndReceive(map);
}

/**
 * 下载部分
 * 判断有无账单明细确定是否进行下一步的下载操作
 *
 * @return
 */
function isDownload( index) {
    var map = new LinkedHashMap();
    map.put("method", "CCB_isNeedDownload");
    map.put("index", index);
    return sendAndReceive(map);
}

/**
 * 下载部分
 * 判断有无账单明细确定是否进行下一步的下载操作
 *
 * @return
 */
function isDownload2() {
    var map = new LinkedHashMap();
    map.put("method", "CCB_isNeedDownload2");
    return sendAndReceive(map);
}

/**
 * 下载部分
 * 获取下载POST请求中的参数
 *
 * @return
 */
function getPostParams( startDate, endDate, index) {
    var map = new LinkedHashMap();
    map.put("method", "CCB_post_params");
    map.put("startDate", startDate);
    map.put("endDate", endDate);
    map.put("index", index);
    return sendAndReceive(map);
}

/**
 * 下载部分
 * 点击账单明细下载---EXCEL下载
 *
 * @return
 */
function downloadExcel() {
    var map = new LinkedHashMap();
    map.put("method", "CCB_download_excel");
    return sendAndReceive(map);
}

/**
 * 下载部分
 * 点击账单明细下载---TXT下载
 *
 * @return
 */
function downloadTxt() {
    var map = new LinkedHashMap();
    map.put("method", "CCB_download_txt");
    return sendAndReceive(map);
}

/**
 * 下载部分
 * 点击账单明细下载---TXT下载
 *
 * @return
 */
function downloadTxt2() {
    var map = new LinkedHashMap();
    map.put("method", "CCB_download_txt2");
    return sendAndReceive(map);
}

/**
 * 截取当前屏幕的状态
 *
 * @return
 */
function getScreenShots() {
    var map = new LinkedHashMap();
    map.put("method", "CCB_getScreenShots");
    return sendAndReceive(map);
}

/**
 * 点击登录按钮
 *
 * @return
 */
function ccbClick( frameId, clickId) {
    var map = new LinkedHashMap();
    map.put("method", "CCB_click");
    map.put("frameId", frameId);
    map.put("clickId", clickId);
    return sendAndReceive(map);
}

/**
 * 通过ajax方式post,注意跨域<br>
 * 在调用方法之前会进行域名校验,如果域名不相等,会返回跨域错误
 *
 * @param url
 * @param postdata
 * @return
 */
function ajax_post_dif_ie( url, postdata) {
    var map = new LinkedHashMap();
    var sb = new StringBuffer();
    for each (var key in postdata.keySet()) {
        if(!"index".equals(key)){
            sb.append(key + "=" + postdata.get(key) + "&");
        }
    }
    data = "";
    if (sb.length() > 0) {
        data = sb.substring(0, sb.length() - 1);
    }
    data1 = data;
    map.put("url", url);
    map.put("method", "ajax_post_dif_ie");
    map.put("data", data1);
    map.put("index", postdata.get("index"));
    return sendAndReceive(map);
}

/**
 * 通过ajax方式post,注意跨域<br>
 * 在调用方法之前会进行域名校验,如果域名不相等,会返回跨域错误
 *
 * @return
 */
function login(userId, password) {
    var map = new LinkedHashMap();
    map.put("method", "login");
    map.put("userId", userId);
    map.put("password", password);
    return sendAndReceive(map);
}

function closeIE() {
    var map = new LinkedHashMap();
    map.put("method", "closeIE");
    map.put("isEnd", "1");
    return sendAndReceive(map);
}

function createIE() {
    var map = new LinkedHashMap();
    map.put("method", "createIE");
    return sendAndReceive(map);
}

function getFrameId() {
    var map = new LinkedHashMap();
    map.put("method", "getFrameId");
    return sendAndReceive(map);
}

function testNavigate() {
    var map = new LinkedHashMap();
    map.put("method", "testNavigate");
    return sendAndReceive(map);
}

function if_Exit_ImsCode() {
    var map = new HashMap();
    map.put("method", "if_Exit_ImsCode");
    return sendAndReceive(map);
}

function saveHtmlAndImage(name){
    var map = new HashMap();
    map.put("method", "saveHtmlAndImage");
    map.put("name", name);
    return sendAndReceive(map);
}

function saveIframeHtmlAndImage(frameIds, name){
    var map = new HashMap();
    map.put("method", "saveIframeHtmlAndImage");
    map.put("frameIds", frameIds);
    map.put("name", name);
    return sendAndReceive(map);
}
function setAnster(anster,fangWei) {
    var map = new HashMap();
    map.put("method", "setAnster");
    map.put("anster", "anster");
    return sendAndReceive(map);
}

function clickButon() {
    var map = new HashMap();
    map.put("method", "clickButon");
    return sendAndReceive(map);
}
/**
 * 隐藏窗口
 */
function  hide() {
    var map = new LinkedHashMap();
    map.put("method", "hide");
    return sendAndReceive(map);
}
/**
 * 是否存在iframe
 *
 */
function iframeIfExist() {
    var map = new LinkedHashMap();
    map.put("method", "iframeIfExist");
    return sendAndReceive(map);
}

/**
 * 获取短信输入内容
 */
function getSmsInputResult(frameFlag) {
    var map = new LinkedHashMap();
    map.put("method", "getSmsInputResult");
    map.put("frameFlag",frameFlag);
    return sendAndReceive(map);
}

/**
 * 点击确定
 * @returns {*}
 */
function clickSmsButton(frameFlag) {
    var map = new LinkedHashMap();
    map.put("method", "clickSmsButton");
    map.put("frameFlag",frameFlag);
    return sendAndReceive(map);
}

function clickThePage() {
    var map = new LinkedHashMap();
    map.put("method", "clickThePage");
    return sendAndReceive(map);
}

//单独点击登录按钮
function click_login_button2() {
    var map = new LinkedHashMap();
    map.put("method", "click_login_button");
    return sendAndReceive(map);
}